namespace Trader.BO
{
    using Interface;

    public class Quote : IQuote
    {
        private readonly decimal high;
        private readonly decimal low;

        public Quote(decimal closing, decimal high, decimal low, decimal volume)
        {
            Closing = closing;
            this.low = low;
            this.high = high;
            Volume = volume;
        }

        #region IQuote Members

        public decimal Closing { get; private set; }

        public decimal High
        {
            get { return high != 0M ? high : Closing; }
        }

        public decimal Low
        {
            get { return low != 0M ? low : Closing; }
        }

        public decimal Volume { get; private set; }

        #endregion
    }
}